Instance Properties

The Instance Properties editor tab page is used to edit List type objects.

You can use these icons to add new property rows or columns to the object. Note that they may not always be enabled for all types of objects. For example, you can't add more value rows to a Boolean attribute, as only the two true/false values are allowed.

List Attributes

The rows of the Instance property tab page can be used to specify the values that you want to allow for a List attribute, as shown in the example below. An additional property column (Prop_1) has also been added.

Prop_1 can be renamed (for example, to "Price") and can be of type List, Integer, Numeric (as in this example), Boolean, Date, String or Link.

Prop_1 can also be referenced in procedural commands by using the syntax objectname.propertyname. For example, if the Attribute was called "Color", you could use:

@Assign TotalCost = TotalCost + Color.Price

However, note that a value must have been obtained for the attribute Color, prior to using the property like this.

You can also reference the property of an individual value (or item) directly by using its position in the value/item column. For example:

@Assign Cost = Color.Price[2]

would return the numeric value 150.00 in Cost.

Properties can also be used in places such as within decision trees. You can use properties in tree branches by dragging and dropping them from the Knowledge Explorer - just as you could do with objects such as attributes.

More:

The topic on List_Attributes provides more details on the tools available in this editor window.

See also the Techniques section on Using Base Classes, Classes and Instances.

Instance Property Settings

These settings can be changed either at the object level or at the base class level. If the change is made at the object then the changes will apply only to that object, alternatively if the change is made at the base class then this will affect all the child objects of that base class.

Instance properties can be based on the following data types, List, Integer, Numeric, Boolean, Date, String, Link

Name

The property's name must comply with the rules for Object names.

Description

The description is an optional string and can be used for the developer's own documentation purposes.

Include in encoded data

Checkbox to include the property name and value in the encoded data via @EncodeData

Returned by GoXML

There is an interface method called 'GoXML' which is designed to give a simple method of executing a knowledge base with a set of pre-supplied object values and retrieving a specified list of object values at the end of inference. If the property is marked to be returned by GoXML then the property name and property value of the object's selected value will be included in the output of the GoXML method whenever the object is returned. See XML help.

Translate

Instance Properties can be marked for translation by enabling the Translate checkbox. See Translation help.

Output in hierarchy

Checkbox to include the property name and value in the hierarchy for subsequent display (@HierarchyShow) or further processing (@HierarchyToFile, @HierarchyToStr, hierarchy.getPropValue).

Child Property Write Enabled

If this checkbox is checked then the property values can be edited, otherwise the property values are set from the base class. This setting is controlled from the base class and can be accessed by disabling the mini icon shown below.

Values tab (not applicable to integer, boolean and date types)

list: rows of values with checkbox to enable multiselect

numeric: 1 to 9 decimal places

string: maximum string length (default set to 100)

link: maximum string length (default set to 255)

Security tab

The property can be restricted to specific roles or available to all roles which is the default.

Pattern Matching tab

See the Instance Property Settings in the Constraints section.

Runtime Display tab

In order to display a property in a dialog control at runtime, either accept the default positioning or specify the left to right order of the property columns (by default, all properties are hidden). For a grid the order of the properties is either dictated by the order of the columns when the properties are set to 'Default Order' or the 'Specified Order'. The properties that are set to be displayed are indicated by a mini green square on the property header.

For a listbox or a drop-down listbox the property that is displayed in the dialog control is either the first column (reading along the property headers from left to right) marked by a mini green square on the property header when the 'Default Order' is used, or the property that has its 'Specified Oder' set to 1.

Constraints tab

See the Instance Property Settings in the Constraints section